<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkMenu</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="prev" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry">
<link rel="next" href="GtkMenuBar.html" title="GtkMenuBar">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="Builder.html" title="Interface builder">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="chapter" href="gtk-migrating-GtkBuilder.html" title="Migrating from libglade to GtkBuilder">
<link rel="chapter" href="gtk-migrating-tooltips.html" title="Migrating from GtkTooltips to GtkTooltip">
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="api-index-full.html" title="Index of all symbols">
<link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
<link rel="index" href="api-index-2-2.html" title="Index of new symbols in 2.2">
<link rel="index" href="api-index-2-4.html" title="Index of new symbols in 2.4">
<link rel="index" href="api-index-2-6.html" title="Index of new symbols in 2.6">
<link rel="index" href="api-index-2-8.html" title="Index of new symbols in 2.8">
<link rel="index" href="api-index-2-10.html" title="Index of new symbols in 2.10">
<link rel="index" href="api-index-2-12.html" title="Index of new symbols in 2.12">
<link rel="index" href="api-index-2-14.html" title="Index of new symbols in 2.14">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkComboBoxEntry.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="MenusAndCombos.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="GtkMenuBar.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GtkMenu.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#GtkMenu.description" class="shortcut">Description</a>
                 | 
                <a href="#GtkMenu.object-hierarchy" class="shortcut">Object Hierarchy</a>
                 | 
                <a href="#GtkMenu.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                 | 
                <a href="#GtkMenu.properties" class="shortcut">Properties</a>
                 | 
                <a href="#GtkMenu.child-properties" class="shortcut">Child Properties</a>
                 | 
                <a href="#GtkMenu.style-properties" class="shortcut">Style Properties</a>
                 | 
                <a href="#GtkMenu.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkMenu"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkMenu.top_of_page"></a>GtkMenu</span></h2>
<p>GtkMenu — A menu widget</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GtkMenu.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gtk/gtk.h&gt;

                    <a class="link" href="GtkMenu.html#GtkMenu-struct" title="GtkMenu">GtkMenu</a>;
<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a class="link" href="GtkMenu.html#gtk-menu-new" title="gtk_menu_new ()">gtk_menu_new</a>                        (void);
void                <a class="link" href="GtkMenu.html#gtk-menu-set-screen" title="gtk_menu_set_screen ()">gtk_menu_set_screen</a>                 (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/gdk/GdkScreen.html"
>GdkScreen</a> *screen);
#define             <a class="link" href="GtkMenu.html#gtk-menu-append" title="gtk_menu_append()">gtk_menu_append</a>                     (menu,child)
#define             <a class="link" href="GtkMenu.html#gtk-menu-prepend" title="gtk_menu_prepend()">gtk_menu_prepend</a>                    (menu,child)
#define             <a class="link" href="GtkMenu.html#gtk-menu-insert" title="gtk_menu_insert()">gtk_menu_insert</a>                     (menu,child,pos)
void                <a class="link" href="GtkMenu.html#gtk-menu-reorder-child" title="gtk_menu_reorder_child ()">gtk_menu_reorder_child</a>              (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> position);
void                <a class="link" href="GtkMenu.html#gtk-menu-attach" title="gtk_menu_attach ()">gtk_menu_attach</a>                     (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> left_attach,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> right_attach,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> top_attach,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> bottom_attach);
void                <a class="link" href="GtkMenu.html#gtk-menu-popup" title="gtk_menu_popup ()">gtk_menu_popup</a>                      (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *parent_menu_shell,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *parent_menu_item,
                                                         <a class="link" href="GtkMenu.html#GtkMenuPositionFunc" title="GtkMenuPositionFunc ()">GtkMenuPositionFunc</a> func,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> button,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> activate_time);
void                <a class="link" href="GtkMenu.html#gtk-menu-set-accel-group" title="gtk_menu_set_accel_group ()">gtk_menu_set_accel_group</a>            (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group);
<a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>*      <a class="link" href="GtkMenu.html#gtk-menu-get-accel-group" title="gtk_menu_get_accel_group ()">gtk_menu_get_accel_group</a>            (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
void                <a class="link" href="GtkMenu.html#gtk-menu-set-accel-path" title="gtk_menu_set_accel_path ()">gtk_menu_set_accel_path</a>             (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *accel_path);
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*        <a class="link" href="GtkMenu.html#gtk-menu-get-accel-path" title="gtk_menu_get_accel_path ()">gtk_menu_get_accel_path</a>             (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
void                <a class="link" href="GtkMenu.html#gtk-menu-set-title" title="gtk_menu_set_title ()">gtk_menu_set_title</a>                  (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *title);
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *       <a class="link" href="GtkMenu.html#gtk-menu-get-title" title="gtk_menu_get_title ()">gtk_menu_get_title</a>                  (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
void                <a class="link" href="GtkMenu.html#gtk-menu-set-monitor" title="gtk_menu_set_monitor ()">gtk_menu_set_monitor</a>                (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> monitor_num);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                <a class="link" href="GtkMenu.html#gtk-menu-get-monitor" title="gtk_menu_get_monitor ()">gtk_menu_get_monitor</a>                (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="GtkMenu.html#gtk-menu-get-tearoff-state" title="gtk_menu_get_tearoff_state ()">gtk_menu_get_tearoff_state</a>          (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);

void                <a class="link" href="GtkMenu.html#gtk-menu-popdown" title="gtk_menu_popdown ()">gtk_menu_popdown</a>                    (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
void                <a class="link" href="GtkMenu.html#gtk-menu-reposition" title="gtk_menu_reposition ()">gtk_menu_reposition</a>                 (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a class="link" href="GtkMenu.html#gtk-menu-get-active" title="gtk_menu_get_active ()">gtk_menu_get_active</a>                 (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
void                <a class="link" href="GtkMenu.html#gtk-menu-set-active" title="gtk_menu_set_active ()">gtk_menu_set_active</a>                 (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> index_);
void                <a class="link" href="GtkMenu.html#gtk-menu-set-tearoff-state" title="gtk_menu_set_tearoff_state ()">gtk_menu_set_tearoff_state</a>          (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> torn_off);
void                <a class="link" href="GtkMenu.html#gtk-menu-attach-to-widget" title="gtk_menu_attach_to_widget ()">gtk_menu_attach_to_widget</a>           (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *attach_widget,
                                                         <a class="link" href="GtkMenu.html#GtkMenuDetachFunc" title="GtkMenuDetachFunc ()">GtkMenuDetachFunc</a> detacher);
void                <a class="link" href="GtkMenu.html#gtk-menu-detach" title="gtk_menu_detach ()">gtk_menu_detach</a>                     (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a class="link" href="GtkMenu.html#gtk-menu-get-attach-widget" title="gtk_menu_get_attach_widget ()">gtk_menu_get_attach_widget</a>          (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
<a
href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>*              <a class="link" href="GtkMenu.html#gtk-menu-get-for-attach-widget" title="gtk_menu_get_for_attach_widget ()">gtk_menu_get_for_attach_widget</a>      (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
void                (<a class="link" href="GtkMenu.html#GtkMenuPositionFunc" title="GtkMenuPositionFunc ()">*GtkMenuPositionFunc</a>)              (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *x,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *y,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> *push_in,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
void                (<a class="link" href="GtkMenu.html#GtkMenuDetachFunc" title="GtkMenuDetachFunc ()">*GtkMenuDetachFunc</a>)                (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *attach_widget,
                                                         <a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
>GInitiallyUnowned</a>
         +----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
               +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
                     +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
                           +----<a class="link" href="GtkMenuShell.html" title="GtkMenuShell">GtkMenuShell</a>
                                 +----GtkMenu
                                       +----<a class="link" href="GtkRecentChooserMenu.html" title="GtkRecentChooserMenu">GtkRecentChooserMenu</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkMenu implements
 AtkImplementorIface and  <a class="link" href="gtk-gtkbuildable.html#GtkBuildable">GtkBuildable</a>.</p>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkMenu.html#GtkMenu--accel-group" title='The "accel-group" property'>accel-group</a>"              <a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>*        : Read / Write
  "<a class="link" href="GtkMenu.html#GtkMenu--accel-path" title='The "accel-path" property'>accel-path</a>"               <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write
  "<a class="link" href="GtkMenu.html#GtkMenu--active" title='The "active" property'>active</a>"                   <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write
  "<a class="link" href="GtkMenu.html#GtkMenu--attach-widget" title='The "attach-widget" property'>attach-widget</a>"            <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*            : Read / Write
  "<a class="link" href="GtkMenu.html#GtkMenu--monitor" title='The "monitor" property'>monitor</a>"                  <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write
  "<a class="link" href="GtkMenu.html#GtkMenu--tearoff-state" title='The "tearoff-state" property'>tearoff-state</a>"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write
  "<a class="link" href="GtkMenu.html#GtkMenu--tearoff-title" title='The "tearoff-title" property'>tearoff-title</a>"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.child-properties"></a><h2>Child Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkMenu.html#GtkMenu--c-bottom-attach" title='The "bottom-attach" child property'>bottom-attach</a>"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write
  "<a class="link" href="GtkMenu.html#GtkMenu--c-left-attach" title='The "left-attach" child property'>left-attach</a>"              <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write
  "<a class="link" href="GtkMenu.html#GtkMenu--c-right-attach" title='The "right-attach" child property'>right-attach</a>"             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write
  "<a class="link" href="GtkMenu.html#GtkMenu--c-top-attach" title='The "top-attach" child property'>top-attach</a>"               <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.style-properties"></a><h2>Style Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkMenu.html#GtkMenu--s-double-arrows" title='The "double-arrows" style property'>double-arrows</a>"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read
  "<a class="link" href="GtkMenu.html#GtkMenu--s-horizontal-offset" title='The "horizontal-offset" style property'>horizontal-offset</a>"        <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read
  "<a class="link" href="GtkMenu.html#GtkMenu--s-horizontal-padding" title='The "horizontal-padding" style property'>horizontal-padding</a>"       <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read
  "<a class="link" href="GtkMenu.html#GtkMenu--s-vertical-offset" title='The "vertical-offset" style property'>vertical-offset</a>"          <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read
  "<a class="link" href="GtkMenu.html#GtkMenu--s-vertical-padding" title='The "vertical-padding" style property'>vertical-padding</a>"         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="GtkMenu.html#GtkMenu-move-scroll" title='The "move-scroll" signal'>move-scroll</a>"                                    : Run Last / Action
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.description"></a><h2>Description</h2>
<p>
A <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> is a <a class="link" href="GtkMenuShell.html" title="GtkMenuShell"><span class="type">GtkMenuShell</span></a> that implements a drop down menu consisting of
a list of <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> objects which can be navigated and activated by the
user to perform application functions.
</p>
<p>
A <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> is most commonly dropped down by activating a <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> in a
<a class="link" href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a> or popped up by activating a <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> in another <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</p>
<p>
A <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> can also be popped up by activating a <a class="link" href="GtkOptionMenu.html" title="GtkOptionMenu"><span class="type">GtkOptionMenu</span></a>.
Other composite widgets such as the <a class="link" href="GtkNotebook.html" title="GtkNotebook"><span class="type">GtkNotebook</span></a> can pop up a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
as well.
</p>
<p>
Applications can display a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> as a popup menu by calling the
<a class="link" href="GtkMenu.html#gtk-menu-popup" title="gtk_menu_popup ()"><code class="function">gtk_menu_popup()</code></a> function.  The example below shows how an application
can pop up a menu when the 3rd mouse button is pressed.
</p>
<div class="example">
<a name="id3524064"></a><p class="title"><b>Example 26. Connecting the popup signal handler.</b></p>
<div class="example-contents"><pre class="programlisting">
    /* connect our handler which will popup the menu */
    g_signal_connect_swapped (window, "button_press_event",
	G_CALLBACK (my_popup_handler), menu);
</pre></div>
</div>
<br class="example-break"><div class="example">
<a name="id3524081"></a><p class="title"><b>Example 27. Signal handler which displays a popup menu.</b></p>
<div class="example-contents"><pre class="programlisting">
static gint
my_popup_handler (GtkWidget *widget, GdkEvent *event)
{
  GtkMenu *menu;
  GdkEventButton *event_button;
  g_return_val_if_fail (widget != NULL, FALSE);
  g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
  g_return_val_if_fail (event != NULL, FALSE);
  /* The "widget" is the menu that was supplied when
   * g_signal_connect_swapped() was called.
   */
  menu = GTK_MENU (widget);
  if (event-&gt;type == GDK_BUTTON_PRESS)
    {
      event_button = (GdkEventButton *) event;
      if (event_button-&gt;button == 3)
	{
	  gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
			  event_button-&gt;button, event_button-&gt;time);
	  return TRUE;
	}
    }
  return FALSE;
}
</pre></div>
</div>
<br class="example-break">
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="GtkMenu-struct"></a><h3>GtkMenu</h3>
<pre class="programlisting">typedef struct _GtkMenu GtkMenu;</pre>
<p>
The <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> struct contains private data only, and
should be accessed using the functions below.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-new"></a><h3>gtk_menu_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_menu_new                        (void);</pre>
<p>
Creates a new <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-set-screen"></a><h3>gtk_menu_set_screen ()</h3>
<pre class="programlisting">void                gtk_menu_set_screen                 (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/gdk/GdkScreen.html"
>GdkScreen</a> *screen);</pre>
<p>
Sets the <a
href="/usr/share/gtk-doc/html/gdk/GdkScreen.html"
><span class="type">GdkScreen</span></a> on which the menu will be displayed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td> a <a
href="/usr/share/gtk-doc/html/gdk/GdkScreen.html"
><span class="type">GdkScreen</span></a>, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> if the screen should be
         determined by the widget the menu is attached to.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-append"></a><h3>gtk_menu_append()</h3>
<pre class="programlisting">#define gtk_menu_append(menu,child)	gtk_menu_shell_append  ((GtkMenuShell *)(menu),(child))
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_menu_append</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GtkMenuShell.html#gtk-menu-shell-append" title="gtk_menu_shell_append ()"><code class="function">gtk_menu_shell_append()</code></a> instead.</p>
</div>
<p>
Adds a new <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to the end of the menu's item list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td>The <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to add.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-prepend"></a><h3>gtk_menu_prepend()</h3>
<pre class="programlisting">#define gtk_menu_prepend(menu,child)    gtk_menu_shell_prepend ((GtkMenuShell *)(menu),(child))
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_menu_prepend</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GtkMenuShell.html#gtk-menu-shell-prepend" title="gtk_menu_shell_prepend ()"><code class="function">gtk_menu_shell_prepend()</code></a> instead.</p>
</div>
<p>
Adds a new <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to the beginning of the menu's item list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td>The <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to add.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-insert"></a><h3>gtk_menu_insert()</h3>
<pre class="programlisting">#define gtk_menu_insert(menu,child,pos)	gtk_menu_shell_insert ((GtkMenuShell *)(menu),(child),(pos))
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_menu_insert</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GtkMenuShell.html#gtk-menu-shell-insert" title="gtk_menu_shell_insert ()"><code class="function">gtk_menu_shell_insert()</code></a> instead.</p>
</div>
<p>
Adds a new <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to the menu's item list at the position
indicated by <em class="parameter"><code>position</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td>The <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to add.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td>The position in the item list where <em class="parameter"><code>child</code></em> is added.
      Positions are numbered from 0 to n-1.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-reorder-child"></a><h3>gtk_menu_reorder_child ()</h3>
<pre class="programlisting">void                gtk_menu_reorder_child              (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> position);</pre>
<p>
Moves a <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to a new position within the <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td>the <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to move.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td>the new position to place <em class="parameter"><code>child</code></em>.  Positions are numbered from 
0 to n-1.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-attach"></a><h3>gtk_menu_attach ()</h3>
<pre class="programlisting">void                gtk_menu_attach                     (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> left_attach,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> right_attach,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> top_attach,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> bottom_attach);</pre>
<p>
Adds a new <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to a (table) menu. The number of 'cells' that
an item will occupy is specified by <em class="parameter"><code>left_attach</code></em>, <em class="parameter"><code>right_attach</code></em>,
<em class="parameter"><code>top_attach</code></em> and <em class="parameter"><code>bottom_attach</code></em>. These each represent the leftmost,
rightmost, uppermost and lower column and row numbers of the table.
(Columns and rows are indexed from zero).
</p>
<p>
Note that this function is not related to <a class="link" href="GtkMenu.html#gtk-menu-detach" title="gtk_menu_detach ()"><code class="function">gtk_menu_detach()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>left_attach</code></em> :</span></p></td>
<td> The column number to attach the left side of the item to.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>right_attach</code></em> :</span></p></td>
<td> The column number to attach the right side of the item to.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>top_attach</code></em> :</span></p></td>
<td> The row number to attach the top of the item to.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bottom_attach</code></em> :</span></p></td>
<td> The row number to attach the bottom of the item to.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-popup"></a><h3>gtk_menu_popup ()</h3>
<pre class="programlisting">void                gtk_menu_popup                      (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *parent_menu_shell,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *parent_menu_item,
                                                         <a class="link" href="GtkMenu.html#GtkMenuPositionFunc" title="GtkMenuPositionFunc ()">GtkMenuPositionFunc</a> func,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> button,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
>guint32</a> activate_time);</pre>
<p>
Displays a menu and makes it available for selection.  Applications can use
this function to display context-sensitive menus, and will typically supply
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> for the <em class="parameter"><code>parent_menu_shell</code></em>, <em class="parameter"><code>parent_menu_item</code></em>, <em class="parameter"><code>func</code></em> and <em class="parameter"><code>data</code></em> 
parameters. The default menu positioning function will position the menu
at the current mouse cursor position.
</p>
<p>
The <em class="parameter"><code>button</code></em> parameter should be the mouse button pressed to initiate
the menu popup. If the menu popup was initiated by something other than
a mouse button press, such as a mouse button release or a keypress,
<em class="parameter"><code>button</code></em> should be 0.
</p>
<p>
The <em class="parameter"><code>activate_time</code></em> parameter is used to conflict-resolve initiation of
concurrent requests for mouse/keyboard grab requests. To function
properly, this needs to be the time stamp of the user event (such as
a mouse click or key press) that caused the initiation of the popup.
Only if no such event is available, <a class="link" href="gtk-General.html#gtk-get-current-event-time" title="gtk_get_current_event_time ()"><code class="function">gtk_get_current_event_time()</code></a> can
be used instead.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent_menu_shell</code></em> :</span></p></td>
<td> the menu shell containing the triggering menu item, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent_menu_item</code></em> :</span></p></td>
<td> the menu item whose activation triggered the popup, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td> a user supplied function used to position the menu, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td> user supplied data to be passed to <em class="parameter"><code>func</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
<td> the mouse button which was pressed to initiate the event.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>activate_time</code></em> :</span></p></td>
<td> the time at which the activation event occurred.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-set-accel-group"></a><h3>gtk_menu_set_accel_group ()</h3>
<pre class="programlisting">void                gtk_menu_set_accel_group            (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group);</pre>
<p>
Set the <a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> which holds global accelerators for the menu.
This accelerator group needs to also be added to all windows that
this menu is being used in with <a class="link" href="GtkWindow.html#gtk-window-add-accel-group" title="gtk_window_add_accel_group ()"><code class="function">gtk_window_add_accel_group()</code></a>, in order
for those windows to support all the accelerators contained in this group.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>accel_group</code></em> :</span></p></td>
<td>the <a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> to be associated with the menu.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-get-accel-group"></a><h3>gtk_menu_get_accel_group ()</h3>
<pre class="programlisting"><a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>*      gtk_menu_get_accel_group            (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Gets the <a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> which holds global accelerators for the menu.
See <a class="link" href="GtkMenu.html#gtk-menu-set-accel-group" title="gtk_menu_set_accel_group ()"><code class="function">gtk_menu_set_accel_group()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> associated with the menu.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-set-accel-path"></a><h3>gtk_menu_set_accel_path ()</h3>
<pre class="programlisting">void                gtk_menu_set_accel_path             (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *accel_path);</pre>
<p>
Sets an accelerator path for this menu from which accelerator paths
for its immediate children, its menu items, can be constructed.
The main purpose of this function is to spare the programmer the
inconvenience of having to call <a class="link" href="GtkMenuItem.html#gtk-menu-item-set-accel-path" title="gtk_menu_item_set_accel_path ()"><code class="function">gtk_menu_item_set_accel_path()</code></a> on
each menu item that should support runtime user changable accelerators.
Instead, by just calling <a class="link" href="GtkMenu.html#gtk-menu-set-accel-path" title="gtk_menu_set_accel_path ()"><code class="function">gtk_menu_set_accel_path()</code></a> on their parent,
each menu item of this menu, that contains a label describing its purpose,
automatically gets an accel path assigned. For example, a menu containing
menu items "New" and "Exit", will, after 
<code class="literal">gtk_menu_set_accel_path (menu, "&lt;Gnumeric-Sheet&gt;/File");</code>
has been called, assign its items the accel paths:
<code class="literal">"&lt;Gnumeric-Sheet&gt;/File/New"</code> and <code class="literal">"&lt;Gnumeric-Sheet&gt;/File/Exit"</code>.
Assigning accel paths to menu items then enables the user to change
their accelerators at runtime. More details about accelerator paths
and their default setups can be found at <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-add-entry" title="gtk_accel_map_add_entry ()"><code class="function">gtk_accel_map_add_entry()</code></a>.
</p>
<p>
Note that <em class="parameter"><code>accel_path</code></em> string will be stored in a <a
href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a>. Therefore, if you
pass a static string, you can save some memory by interning it first with 
<a
href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#g-intern-static-string"
><code class="function">g_intern_static_string()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>       a valid <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
<td> a valid accelerator path
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-get-accel-path"></a><h3>gtk_menu_get_accel_path ()</h3>
<pre class="programlisting">const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*        gtk_menu_get_accel_path             (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Retrieves the accelerator path set on the menu.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td> a valid <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the accelerator path set on the menu.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-set-title"></a><h3>gtk_menu_set_title ()</h3>
<pre class="programlisting">void                gtk_menu_set_title                  (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *title);</pre>
<p>
Sets the title string for the menu.  The title is displayed when the menu
is shown as a tearoff menu.  If <em class="parameter"><code>title</code></em> is <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>, the menu will see if it is
attached to a parent menu item, and if so it will try to use the same text as
that menu item's label.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>title</code></em> :</span></p></td>
<td> a string containing the title for the menu.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-get-title"></a><h3>gtk_menu_get_title ()</h3>
<pre class="programlisting">const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *       gtk_menu_get_title                  (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Returns the title of the menu. See <a class="link" href="GtkMenu.html#gtk-menu-set-title" title="gtk_menu_set_title ()"><code class="function">gtk_menu_set_title()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the title of the menu, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> if the menu has no
title set on it. This string is owned by the widget and should
not be modified or freed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-set-monitor"></a><h3>gtk_menu_set_monitor ()</h3>
<pre class="programlisting">void                gtk_menu_set_monitor                (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> monitor_num);</pre>
<p>
Informs GTK+ on which monitor a menu should be popped up. 
See <a
href="/usr/share/gtk-doc/html/gdk/GdkScreen.html#gdk-screen-get-monitor-geometry"
><code class="function">gdk_screen_get_monitor_geometry()</code></a>.
</p>
<p>
This function should be called from a <a class="link" href="GtkMenu.html#GtkMenuPositionFunc" title="GtkMenuPositionFunc ()"><span class="type">GtkMenuPositionFunc</span></a> if the
menu should not appear on the same monitor as the pointer. This 
information can't be reliably inferred from the coordinates returned
by a <a class="link" href="GtkMenu.html#GtkMenuPositionFunc" title="GtkMenuPositionFunc ()"><span class="type">GtkMenuPositionFunc</span></a>, since, for very long menus, these coordinates 
may extend beyond the monitor boundaries or even the screen boundaries.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>monitor_num</code></em> :</span></p></td>
<td> the number of the monitor on which the menu should
   be popped up
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-get-monitor"></a><h3>gtk_menu_get_monitor ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                gtk_menu_get_monitor                (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Retrieves the number of the monitor on which to show the menu.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the number of the monitor on which the menu should
   be popped up or -1, if no monitor has been set

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-get-tearoff-state"></a><h3>gtk_menu_get_tearoff_state ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            gtk_menu_get_tearoff_state          (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Returns whether the menu is torn off. See
<a class="link" href="GtkMenu.html#gtk-menu-set-tearoff-state" title="gtk_menu_set_tearoff_state ()"><code class="function">gtk_menu_set_tearoff_state()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if the menu is currently torn off.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-popdown"></a><h3>gtk_menu_popdown ()</h3>
<pre class="programlisting">void                gtk_menu_popdown                    (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Removes the menu from the screen.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-reposition"></a><h3>gtk_menu_reposition ()</h3>
<pre class="programlisting">void                gtk_menu_reposition                 (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Repositions the menu according to its position function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-get-active"></a><h3>gtk_menu_get_active ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_menu_get_active                 (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Returns the selected menu item from the menu.  This is used by the
<a class="link" href="GtkOptionMenu.html" title="GtkOptionMenu"><span class="type">GtkOptionMenu</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> that was last selected in the menu.  If a 
selection has not yet been made, the first menu item is selected.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-set-active"></a><h3>gtk_menu_set_active ()</h3>
<pre class="programlisting">void                gtk_menu_set_active                 (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> index_);</pre>
<p>
Selects the specified menu item within the menu.  This is used by the
<a class="link" href="GtkOptionMenu.html" title="GtkOptionMenu"><span class="type">GtkOptionMenu</span></a> and should not be used by anyone else.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index_</code></em> :</span></p></td>
<td>the index of the menu item to select.  Index values are from
0 to n-1.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-set-tearoff-state"></a><h3>gtk_menu_set_tearoff_state ()</h3>
<pre class="programlisting">void                gtk_menu_set_tearoff_state          (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> torn_off);</pre>
<p>
Changes the tearoff state of the menu.  A menu is normally displayed
as drop down menu which persists as long as the menu is active.  It can
also be displayed as a tearoff menu which persists until it is closed
or reattached.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>torn_off</code></em> :</span></p></td>
<td>If <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a>, menu is displayed as a tearoff menu.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-attach-to-widget"></a><h3>gtk_menu_attach_to_widget ()</h3>
<pre class="programlisting">void                gtk_menu_attach_to_widget           (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *attach_widget,
                                                         <a class="link" href="GtkMenu.html#GtkMenuDetachFunc" title="GtkMenuDetachFunc ()">GtkMenuDetachFunc</a> detacher);</pre>
<p>
Attaches the menu to the widget and provides a callback function that will
be invoked when the menu calls <a class="link" href="GtkMenu.html#gtk-menu-detach" title="gtk_menu_detach ()"><code class="function">gtk_menu_detach()</code></a> during its destruction.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>attach_widget</code></em> :</span></p></td>
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu will be attached to.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>detacher</code></em> :</span></p></td>
<td>the user supplied callback function that will be called when 
the menu calls <a class="link" href="GtkMenu.html#gtk-menu-detach" title="gtk_menu_detach ()"><code class="function">gtk_menu_detach()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-detach"></a><h3>gtk_menu_detach ()</h3>
<pre class="programlisting">void                gtk_menu_detach                     (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Detaches the menu from the widget to which it had been attached.
This function will call the callback function, <em class="parameter"><code>detacher</code></em>, provided
when the <a class="link" href="GtkMenu.html#gtk-menu-attach-to-widget" title="gtk_menu_attach_to_widget ()"><code class="function">gtk_menu_attach_to_widget()</code></a> function was called.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-get-attach-widget"></a><h3>gtk_menu_get_attach_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_menu_get_attach_widget          (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
Returns the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu is attached to.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu is attached to.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-menu-get-for-attach-widget"></a><h3>gtk_menu_get_for_attach_widget ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>*              gtk_menu_get_for_attach_widget      (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
<p>
Returns a list of the menus which are attached to this widget.
This list is owned by GTK+ and must not be modified.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td> a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the list of menus attached to his widget.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenuPositionFunc"></a><h3>GtkMenuPositionFunc ()</h3>
<pre class="programlisting">void                (*GtkMenuPositionFunc)              (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *x,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *y,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> *push_in,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
A user function supplied when calling <a class="link" href="GtkMenu.html#gtk-menu-popup" title="gtk_menu_popup ()"><code class="function">gtk_menu_popup()</code></a> which controls the
positioning of the menu when it is displayed.  The function sets the <em class="parameter"><code>x</code></em>
and <em class="parameter"><code>y</code></em> parameters to the coordinates where the menu is to be drawn.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>address of the <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
><span class="type">gint</span></a> representing the horizontal position where the
menu shall be drawn.  This is an output parameter.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>address of the <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
><span class="type">gint</span></a> representing the vertical position where the
menu shall be drawn.  This is an output parameter.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>push_in</code></em> :</span></p></td>
<td>This parameter controls how menus placed outside the monitor are handled.
        If this is set to TRUE and part of the menu is outside the monitor then
        GTK+ pushes the window into the visible area, effectively modifying the
        popup position.
        Note that moving and possibly resizing the menu around will alter the
        scroll position to keep the menu items "in place", i.e. at the same monitor
        position they would have been without resizing.
        In practice, this behavior is only useful for combobox popups or option
        menus and cannot be used to simply confine a menu to monitor boundaries.
        In that case, changing the scroll offset is not desirable.
        To simply constrain the menu within the monitor, get its size with
        <a class="link" href="GtkWidget.html#gtk-widget-size-request" title="gtk_widget_size_request ()"><code class="function">gtk_widget_size_request()</code></a> before showing it, and alter the coordinates
        passed to <a class="link" href="GtkMenu.html#gtk-menu-popup" title="gtk_menu_popup ()"><code class="function">gtk_menu_popup()</code></a> accordingly.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>the data supplied by the user in the <a class="link" href="GtkMenu.html#gtk-menu-popup" title="gtk_menu_popup ()"><code class="function">gtk_menu_popup()</code></a> <em class="parameter"><code>data</code></em>
parameter.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenuDetachFunc"></a><h3>GtkMenuDetachFunc ()</h3>
<pre class="programlisting">void                (*GtkMenuDetachFunc)                (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *attach_widget,
                                                         <a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
<p>
A user function supplied when calling <a class="link" href="GtkMenu.html#gtk-menu-attach-to-widget" title="gtk_menu_attach_to_widget ()"><code class="function">gtk_menu_attach_to_widget()</code></a> which
will be called when the menu is later detached from the widget.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>attach_widget</code></em> :</span></p></td>
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu is being detached from.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>the <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> being detached.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.property-details"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="GtkMenu--accel-group"></a><h3>The <code class="literal">"accel-group"</code> property</h3>
<pre class="programlisting">  "accel-group"              <a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>*        : Read / Write</pre>
<p>
The accel group holding accelerators for the menu.</p>
<p>
</p>
<p>Since 2.14</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--accel-path"></a><h3>The <code class="literal">"accel-path"</code> property</h3>
<pre class="programlisting">  "accel-path"               <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write</pre>
<p>
An accel path used to conveniently construct accel paths of child items.</p>
<p>
</p>
<p>Default value: NULL</p>
<p>Since 2.14</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--active"></a><h3>The <code class="literal">"active"</code> property</h3>
<pre class="programlisting">  "active"                   <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write</pre>
<p>
The index of the currently selected menu item, or -1 if no
menu item is selected.</p>
<p>
</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
<p>Since 2.14</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--attach-widget"></a><h3>The <code class="literal">"attach-widget"</code> property</h3>
<pre class="programlisting">  "attach-widget"            <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*            : Read / Write</pre>
<p>
The widget the menu is attached to. Setting this property attaches
the menu without a <a class="link" href="GtkMenu.html#GtkMenuDetachFunc" title="GtkMenuDetachFunc ()"><span class="type">GtkMenuDetachFunc</span></a>. If you need to use a detacher,
use <a class="link" href="GtkMenu.html#gtk-menu-attach-to-widget" title="gtk_menu_attach_to_widget ()"><code class="function">gtk_menu_attach_to_widget()</code></a> directly.</p>
<p>
</p>
<p>Since 2.14</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--monitor"></a><h3>The <code class="literal">"monitor"</code> property</h3>
<pre class="programlisting">  "monitor"                  <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write</pre>
<p>
The monitor the menu will be popped up on.</p>
<p>
</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
<p>Since 2.14</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--tearoff-state"></a><h3>The <code class="literal">"tearoff-state"</code> property</h3>
<pre class="programlisting">  "tearoff-state"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write</pre>
<p>
A boolean that indicates whether the menu is torn-off.</p>
<p>
</p>
<p>Default value: FALSE</p>
<p>Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--tearoff-title"></a><h3>The <code class="literal">"tearoff-title"</code> property</h3>
<pre class="programlisting">  "tearoff-title"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write</pre>
<p>A title that may be displayed by the window manager when this menu is torn-off.</p>
<p>Default value: NULL</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.child-property-details"></a><h2>Child Property Details</h2>
<div class="refsect2" lang="en">
<a name="GtkMenu--c-bottom-attach"></a><h3>The <code class="literal">"bottom-attach"</code> child property</h3>
<pre class="programlisting">  "bottom-attach"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write</pre>
<p>The row number to attach the bottom of the child to.</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--c-left-attach"></a><h3>The <code class="literal">"left-attach"</code> child property</h3>
<pre class="programlisting">  "left-attach"              <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write</pre>
<p>The column number to attach the left side of the child to.</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--c-right-attach"></a><h3>The <code class="literal">"right-attach"</code> child property</h3>
<pre class="programlisting">  "right-attach"             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write</pre>
<p>The column number to attach the right side of the child to.</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--c-top-attach"></a><h3>The <code class="literal">"top-attach"</code> child property</h3>
<pre class="programlisting">  "top-attach"               <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write</pre>
<p>The row number to attach the top of the child to.</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.style-property-details"></a><h2>Style Property Details</h2>
<div class="refsect2" lang="en">
<a name="GtkMenu--s-double-arrows"></a><h3>The <code class="literal">"double-arrows"</code> style property</h3>
<pre class="programlisting">  "double-arrows"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read</pre>
<p>When scrolling, always show both arrows.</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--s-horizontal-offset"></a><h3>The <code class="literal">"horizontal-offset"</code> style property</h3>
<pre class="programlisting">  "horizontal-offset"        <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read</pre>
<p>When the menu is a submenu, position it this number of pixels offset horizontally.</p>
<p>Default value: -2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--s-horizontal-padding"></a><h3>The <code class="literal">"horizontal-padding"</code> style property</h3>
<pre class="programlisting">  "horizontal-padding"       <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read</pre>
<p>Extra space at the left and right edges of the menu.</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--s-vertical-offset"></a><h3>The <code class="literal">"vertical-offset"</code> style property</h3>
<pre class="programlisting">  "vertical-offset"          <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read</pre>
<p>When the menu is a submenu, position it this number of pixels offset vertically.</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMenu--s-vertical-padding"></a><h3>The <code class="literal">"vertical-padding"</code> style property</h3>
<pre class="programlisting">  "vertical-padding"         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read</pre>
<p>Extra space at the top and bottom of the menu.</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 1</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkMenu.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="GtkMenu-move-scroll"></a><h3>The <code class="literal">"move-scroll"</code> signal</h3>
<pre class="programlisting">void                user_function                      (<a class="link" href="GtkMenu.html" title="GtkMenu">GtkMenu</a>      *menu,
                                                        <a class="link" href="gtk-Standard-Enumerations.html#GtkScrollType" title="enum GtkScrollType">GtkScrollType</a> arg1,
                                                        <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run Last / Action</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>the object which received the signal.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>
